In recent years, use of cash cards and IC cards etc. has become widespread. When these cards are used, information is written to a card using a card reader/writer or written information is read. Inputting of a secret number is therefore first carried out during card accesses. The secret number usually comprises a plurality of digits registered by the user beforehand. When the card user accesses the card at a card reader/writer the correct secret number can be inputted. However, if someone who is not the card user wishes to illegally access the card, the card cannot be accessed if the correct secret number is not inputted.
There are, however, cases where information written to the card can be illegally read and if the secret number is left written on the card as is, accesses with the card can be made at a card reader/writer based on the read secret number. Therefore, rather than just writing the secret number on the card as is, there are many cases where the secret number is written to the card as coded data, with a semiconductor device being used for this coding.
A coding process for a semiconductor device capable of carrying out this coding is performed using the kind of configuration shown, for example, in FIG. 6.
In FIG. 6, "ABCD" is inputted to a data converter 1 via data lines 11, 13, 15 and 17 as the data to be converted. The data is then converted using a first method of conversion at the data converter 1. The converted data is then inputted to a data converter 3 via data lines 21, 23, 25 and 27. The data converter 3 converts data in accordance with a second conversion method. This converted data is then outputted as coded data at data lines 31, 33, 35 and 37 as output data "A'B'C'D'". Security can then be improved by pre-writing this coded data to the card, etc. However, when coding is carried out by the configuration of FIG. 6, for example, the first bit "A" of each of the bits of the data "ABCD" to be converted is converted to "A'" via data lines 11, 21 and 31 positioned at the top and the third bit "C" is converted to "C'" via data lines 13, 23 and 33 positioned third from the top, i.e. converted data can be transferred at data lines arranged in the order of inputted bits of data. Unfortunately, deciphering of the secret number from the coded data can be easily achieved if the conversion contents of the data converters 1 and 3 can be known or analyzed.
If the data lines are not put in order so that, for example, after data bit "A" is converted at data converter 1, wiring is such that data line 21 becomes the third input from the top of the data converter 3, and that after data bit "C" is converted at the data converter circuit 1, the data line 23 becomes the uppermost input of the data converter 3, but as this follows the wiring pattern, this can be easily confirmed by eye.
Further, when the data lines become complicated or numerous, manufacturing processes increase and substantial delays occur due to resistance due to the increase in the number of lines and resistance due to the wiring material used and generation of coded data therefore takes substantial time.
In order to resolve the aforementioned problems, it is an object of the present invention to provide a semiconductor device capable of making deciphering of coded data more difficult and capable of improving security.
The present invention also sets out to provide a semiconductor device capable of easily achieving the above object without the necessity of complicated manufacturing processes.
The present invention further sets out to provide a semiconductor device capable of achieving the above object without increasing the time taken to generate coded data.